package com.zzy.studentsignin.controller;

import com.zzy.studentsignin.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author 邹靓仔
 * @date 2020/4/25 -16:32 -student-signin
 **/
@Controller
public class SingiController {
    @Autowired
    private UserService userService;

    @GetMapping("/")
    public String qiaodaoView(){
        return "signing";
    }

    @GetMapping("/qiandao")
    public String qiandao(String name){
        userService.updateUser(name);
        return "index";
    }

    @GetMapping("/clear")
    public String  clear(){
        userService.update();
        return "index";
    }
    @GetMapping("/returns")
    public String returns(){
        return "index";
    }
    @GetMapping("/excle")
    public String excle(){
        return "excle-upload";
    }
}
